<?php
/**
 * Created by PhpStorm.
 * User: LAI
 * Date: 5.8.14
 * Time: 12.44
 */

session_start();

if (isset($_COOKIE['login']) && isset($_SESSION['login'])){
  $_COOKIE['login'] = NULL;
  $_SESSION['login'] = NULL;
}

include_once("controllers/login_controller.php");
login_controller($_COOKIE['login'], $_SESSION['login'], 1);

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<head>
  <title>Main page - IShop</title>
  <meta http-equiv="Content-Type" content="text/html;  charset=utf-8">
  <link href="css/nonlogined_m_pg.css" rel="stylesheet"/>
  <link href="css/page_plus_menu.css" rel="stylesheet"/>
</head>


<?php
include_once("nonlogined_menu.php");
?>

<body>
<div class="bodyDivToMenu">
</div>

<div class="bodyDivOutsideMenu">
  <form action="handlers/logIn_handler.php" method="post" class="form">
    <label for="username">Name: </label>
    <input type="text" name="username"/><br/>
    <label for="password">Password: </label>
    <input type="password" name="password"/><br/>
    <br/>

    <input type="submit" name="logIn" value="Log In"/>

    <br/>
  </form>
</div>

</body>